<template>
	<div class="header">
		<div class="back-div">
			<i class="iconfont">&#xe624;</i>
		</div>
		<div class="search-div">
			<div class="search">
				<i class="iconfont">&#xe632;</i>
				<span></span>
				请输入城市/游玩主题/景点
			</div>
		</div>
		<router-link to="/city" tag="div" class="city-div">
			<span class="city-info">{{city}}</span>
			<i class="iconfont">&#xe62d;</i>
		</router-link>
	</div>
</template>
<script>
	import {mapState} from 'vuex'
	export default{
		name:"HomeHeader",
		computed:{
			...mapState(["city"])
		}
	}
</script>
<style lang="less" scoped>
	@import '~less/common/base.less';
	@import '~less/common/fun.less';
	.header{
		display: flex;
		height: .88rem;
		line-height: .88rem;
		background: @bgColor;
		text-align: center;
		color:#fff;
		.back-div{
			width: .74rem;
		}
		.search-div{
			flex:1;
			padding: .12rem 0;
			.search{
				background: #fff;
				height: 100%;
				width: 100%;
				border-radius: .06rem;
				color:#ccc;
				text-align: left;
				line-height: .6rem;
				padding-left: .2rem;
				box-sizing: border-box;
				.ellipsis();
			}
		}
		.city-div{
			width: 1.2rem;
			.ellipsis();
		}
	}
</style>